﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RecruitingApplication.Data_Model;

namespace RecruitingApplication.DashboardView
{
    public partial class DashboardViewColumn : System.Web.UI.UserControl
    {
        public string StateName
        {
            get { return StateNameLbl.Text; }
            set { StateNameLbl.Text = value; }
        }
        public int StateID { get; set; }

        protected void Page_Load(object sender, EventArgs e)
        {
            //if this is initial load, get applications from db
            DataAccessLayer.OpenDB();

            CandidatesListView.DataSource =
            DataAccessLayer.GetAllActiveApplicationsInState(StateID);
            CandidatesListView.DataBind();

            DataAccessLayer.CloseDB();
        }
    }
}